<template>
  <div>
    <group>
      <cell title="举报主题:" :value="dataContent.crtitle"></cell>
      <cell title="举报类型:" :value="dataContent.crtype"></cell>
      <cell title="举报内容:" :value="dataContent.crcontent"></cell>
      <cell title="联系人:" :value="dataContent.contanctperson"></cell>
      <cell title="联系电话:" :value="dataContent.contanctphone"></cell>
      <cell title="举报时间:" :value="dataContent.createdatestr"></cell>
    </group>
    <!--<div class="btn-box" style="margin-top: 30px;">-->
      <!--<x-button type="warn">撤销举报</x-button>-->
    <!--</div>-->
  </div>
</template>
<script>
  import { Cell,Group,XButton } from 'vux'
  export default {
    data(){
      return {
        guid: this.$route.params.guid,
        dataContent:{
          crtitle:'',
          crcontent:'',
          crtype:'',
          contanctperson:'',
          contanctphone:'',
          createdatestr:''
        }
      }
    },
    created(){
      this.initData();
    },
    methods:{
      initData(){

        let _self = this;
        console.log(_self.guid);
        this.axios.get(global.baseApiUrl+'/apphub/report/'+_self.guid)
          .then(function (response) {
              console.log(response.date);
            //返回数据写入到数据结构中
            _self.dataContent=response.data.data;
          })
          .catch(function (response) {
            //报错打印错误信息
            console.log(response);
          });
      }
    },
    components:{
      XButton,
      Cell,
      Group
    }
  }
</script>

